﻿using System;
using System.Drawing;
using System.Windows.Forms;
using Narau.Required_interfaces;

namespace Narau.WindowsForms
{
    static class GlobalFonts
    {
        public static Font m_nihongo_font;
        public static Font m_standard_font;
    }

    //----------------------------------------------------------------------------
    // Implementación del required interface de Narau (para presentación visual)
    // en Windows forms
    //----------------------------------------------------------------------------
    class Narau_WF : ReqIntf_View
    {
        private Panel_WF         m_Panel_Up;
        private Panel_WF         m_Panel_Dw;
        private Tree_WF          m_tree_view;

        public Narau_WF(FlowLayoutPanel flow_layout_panel_up, FlowLayoutPanel flow_layout_panel_dw, TreeView inTree)
        {
            flow_layout_panel_up.FlowDirection = FlowDirection.TopDown;
            flow_layout_panel_dw.FlowDirection = FlowDirection.LeftToRight;

            m_Panel_Up  = new Panel_WF(flow_layout_panel_up);
            m_Panel_Dw  = new Panel_WF(flow_layout_panel_dw);
            m_tree_view = new Tree_WF(inTree);

            // Creación de fuentes
            //GlobalFonts.m_nihongo_font = new Font("MingLiu", 12);
            //GlobalFonts.m_nihongo_font = new Font("MS Gothic", 12);
            //GlobalFonts.m_nihongo_font = new Font("Gullim", 20);
            //GlobalFonts.m_nihongo_font = new Font("SimHei", 18);
            //GlobalFonts.m_nihongo_font = new Font("MS Mincho", 14);
            GlobalFonts.m_nihongo_font = new Font("MS PGothic", 16);
            GlobalFonts.m_standard_font = new Font("Microsoft Sans Serif", 10);

            inTree.Font = GlobalFonts.m_nihongo_font;
        }

        //---------------------------------------------
        // Implementación del interfaz: ReqIntf_View  
        //---------------------------------------------
        #region ReqIntf_View Members

            public ReqIntf_Tree TreeIntf
            {
                get { return m_tree_view; }
            }

            public ReqIntf_Panel PanelUpIntf
            {
                get { return m_Panel_Up; }
            }

            public ReqIntf_Panel PanelDownIntf
            {
                get { return m_Panel_Dw; }
            }

        #endregion
    }
}
